---
sidebar_position: 1
title: Sequelize v7 (alpha)
sidebar_label: Introduction
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import DecoratorInfo from './_fragments/_decorator-info.mdx';

[![npm version](https://badgen.net/npm/v/@sequelize/core)](https://www.npmjs.com/package/@sequelize/core)
[![npm downloads](https://badgen.net/npm/dm/@sequelize/core)](https://www.npmjs.com/package/@sequelize/core)
[![sponsor](https://img.shields.io/opencollective/all/sequelize?label=sponsors)](https://opencollective.com/sequelize)
[![Last commit](https://badgen.net/github/last-commit/sequelize/sequelize/main)](https://github.com/sequelize/sequelize)
[![Merged PRs](https://badgen.net/github/merged-prs/sequelize/sequelize)](https://github.com/sequelize/sequelize)
[![GitHub stars](https://badgen.net/github/stars/sequelize/sequelize)](https://github.com/sequelize/sequelize)
[![node](https://badgen.net/npm/node/@sequelize/core)](https://www.npmjs.com/package/@sequelize/core)
[![License](https://badgen.net/github/license/sequelize/sequelize)](https://github.com/sequelize/sequelize/blob/main/LICENSE)

Sequelize is a promise-based [Node.js](https://nodejs.org/en/about/) [ORM tool](https://en.wikipedia.org/wiki/Object-relational_mapping) for [Postgres](https://en.wikipedia.org/wiki/PostgreSQL), [MySQL](https://en.wikipedia.org/wiki/MySQL), [MariaDB](https://en.wikipedia.org/wiki/MariaDB), [SQLite](https://en.wikipedia.org/wiki/SQLite), [Microsoft SQL Server](https://en.wikipedia.org/wiki/Microsoft_SQL_Server), [Amazon Redshift](https://docs.aws.amazon.com/redshift/index.html) and [Snowflake’s Data Cloud](https://docs.snowflake.com/en/user-guide/intro-key-concepts.html). It features solid transaction support, relations, eager and lazy loading, read replication and more.

Sequelize follows [Semantic Versioning](https://semver.org) and the [official Node.js LTS schedule](https://nodejs.org/en/about/releases/). Version 7 of Sequelize officially supports the Node.js versions `>=18.0.0`.

You are currently looking at the **Tutorials and Guides** for Sequelize. You might also be interested in the [API Reference](pathname:///api/v7).

## Quick example

<Tabs groupId="ts-js">
<TabItem value="ts" label="TypeScript">

```typescript
import {
  Sequelize,
  Model,
  DataTypes,
  InferAttributes,
  InferCreationAttributes,
} from '@sequelize/core';
import { Attribute } from '@sequelize/core/decorators-legacy';
import { SqliteDialect } from '@sequelize/sqlite3';

class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {
  @Attribute(DataTypes.STRING)
  declare username: string | null;

  @Attribute(DataTypes.DATE)
  declare birthday: Date | null;
}

const sequelize = new Sequelize({
  dialect: SqliteDialect,
  models: [User],
});

await sequelize.sync();

const jane = await User.create({
  username: 'janedoe',
  birthday: new Date(1980, 6, 20),
});

console.log(jane.toJSON());
```

</TabItem>
<TabItem value="js" label="JavaScript">

```typescript
import { Sequelize, Model, DataTypes } from '@sequelize/core';
import { Attribute } from '@sequelize/core/decorators-legacy';
import { SqliteDialect } from '@sequelize/sqlite3';

class User extends Model {
  @Attribute(DataTypes.STRING)
  username;

  @Attribute(DataTypes.DATE)
  birthday;
}

const sequelize = new Sequelize({
  dialect: SqliteDialect,
  models: [User],
});

await sequelize.sync();

const jane = await User.create({
  username: 'janedoe',
  birthday: new Date(1980, 6, 20),
});

console.log(jane.toJSON());
```

</TabItem>
</Tabs>

<DecoratorInfo />

To learn more about how to use Sequelize, read the tutorials available in the left menu. Begin with [Getting Started](./getting-started.mdx).

## Supporting the project

Do you like Sequelize and would like to give back to the engineering team behind it?

We have recently created an [OpenCollective based money pool](https://opencollective.com/sequelize) which is shared amongst all core maintainers based on their contributions. Every support is wholeheartedly welcome. ❤️
